
// 获取当前世界时间
const getUTCTime = (nowTime) => {
  const time = new Date(nowTime)
  const timeOffset = time.getTimezoneOffset()
  return timeOffset * 60000
}

const getTime = (time) => {
  var moment = require('moment')
  if (time) {
    const newtime1 = moment(time).format('YYYY-MM-DD HH:mm:ss')
    // // console.log(newtime1)
    // const newtime = newtime1.replace(/\s/g, '%20')
    // // console.log(String(newtime.replace(/:/g, '%3A')))
    // return String(newtime.replace(/:/g, '%3A'))
    return newtime1
    // // console.log(newtime.replace(/:/g, '%3A'))
  }
}

export default {
  getUTCTime,
  getTime
}
